package com.shensi.adminCollect.controller.station;

import com.shensi.common.core.domain.ResultData;
import com.shensi.adminCollect.service.station.IElectronicCardRefundRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date 2023/9/8
 */
@RestController
//@RequestMapping("customer/card/refund")
@Api("电子卡充值退款")
public class ElectronicCardRefundRecordController {

    @Autowired
    private IElectronicCardRefundRecordService electronicCardRefundRecordService;

    @GetMapping(path = {"customer/card/refund","customer/anny/card/refund/{timestamp}/{sign}"})
    @ApiOperation("充值订单退款")
    public ResultData rechargeRefund(@RequestParam("id") long useRecordId,
                                     @RequestParam(name = "userId",required = false,defaultValue = "") Long userId){
        return ResultData.success(electronicCardRefundRecordService.rechargeRefund(useRecordId,userId));
    }


//    @PostMapping("notify/sxf")
//    public String sxfNotify(){
//        return "{\"code\":\"success\",\"msg\":\"成功\"}";
//    }

}
